-
software architecture (a really good one IMO, using an idiomatic version of it for every non-trivial app since about 25-07/🚀 linguanodon)
-
structure your project according to the layers:
app,pages,widgets,features,entities,shared - never import from a layer that's above, never import from a neighboring slice.
- think about — and seek — coherence: within a slice, things may criss-cross import each other. Build these strongly coherent blocks.
- remember the graphic in 📰 Cohesion and Coupling: the difference
- the framework really leans itself to first building a fat block of code, and refactoring later ("moving things into the basement") if needed.
- "not everything needs to be a feature"
- keep the
sharedcomponents dumb. No business logic there. - I have not really used standardized segment folders, rather just doing what I want within slice folders. Will possibly bite me later?
- It seems weird (and unnecessary) at times to define all exports via an
index.tsfile, especially Vue components